home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
cgraphix
/
kdrawsym.c
< prev
next >
Wrap
Text File
|
1986-05-08
|
2KB
|
68 lines
/* «RM120»«PL99999»«TS4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76» */
#include <stdio.h>
#define EXTERN extern
#include <typedef.h>
void DrawCrossDiag(x, y, scale)
int x, y, scale;
{
DrawLineClipped(x - scale, y + scale, x + scale + 1, y - scale - 1);
DrawLineClipped(x - scale, y - scale, x + scale + 1, y + scale + 1);
}
void DrawWye(x, y, scale)
int x, y, scale;
{
DrawLineClipped(x - scale, y - scale, x, y);
DrawLineClipped(x + scale, y - scale, x, y);
DrawLineClipped(x, y, x, y + scale);
}
void DrawDiamond(x, y, scale)
int x, y, scale;
{
DrawLineClipped(x - scale, y, x, y - scale - 1);
DrawLineClipped(x, y - scale + 1, x + scale, y + 1);
DrawLineClipped(x + scale, y + 1, x, y + scale);
DrawLineClipped(x, y + scale, x - scale, y);
}
void DrawCircle(X_R, Y_R, xradius)
double X_R, Y_R, xradius;
{
int DirectModeLoc;
DirectModeLoc = DirectModeGlb;
DirectModeGlb = TRUE;
if (DirectModeLoc) {
DrawCircleDirect((int)(X_R),(int)(Y_R),(int)(xradius),TRUE);
}
else {
DrawCircleDirect(WindowX(X_R),WindowY(Y_R),(int)(xradius*100.0),FALSE);
}
DirectModeGlb = DirectModeLoc;
}
void DrawCross(x1, y1, scale)
int x1, y1, scale;
{
DrawLineClipped(x1 - scale, y1, x1 + scale + 2, y1);
DrawLineClipped(x1, y1 - scale, x1, y1 + scale + 1);
}
void DrawStar(x, y, scale)
int x, y, scale;
{
DrawLineClipped(x - scale, y + scale, x + scale + 1, y - scale - 1);
DrawLineClipped(x - scale, y - scale, x + scale + 1, y + scale + 1);
DrawLineClipped(x - scale - 2, y, x + scale + 4, y);
}